<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <!-- <button></button> -->
  </div>
  <script>
    let el=document.createElement('button')
    el.title='按钮提示文字'
    el.className='danger'
    el.innerHTML='提交'
    // console.log(el);
    let root =document.getElementById('app')
    // console.log(root);
    root.appendChild(el)
  </script>
</body>
</html>